package com.datas.db.hibernatebeans;

import com.datas.utils.hibernatebasebean.BaseHibernateEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * Created by jige0727 on 2017/3/12.
 * 部门 分级 使用dept_struct分级
 */
@Getter
@Setter
@Entity
public class UmsDepartment extends BaseHibernateEntity {
    private String dept_name;
    private String dept_code;
    private Integer parent_dept_id; //上级的id 根节点则为 null
    private String parent_dept_name; //上级的名称
    private String struct = ""; //结构 每个节点的id拼一起 -隔开
    //
    private String mobilephone;

    private String email;
    private String tel;
    private String area;// 大区
    private String province;// 省份
    private String city;// 城市
    private String town;// 区县

    private String ctct; //(联系人)、
    private String ctctTel; //(联系人电话)、
    private String bidDept; //（招标单位）、
    private String bidDeptAddr; //(招标单位地址)

    @Column(nullable = false)
    public String getDept_name() {
        return dept_name;
    }

    @Column(nullable = false, unique = true)
    public String getDept_code() {
        return dept_code;
    }

    @Column(length = 500)
    public String getStruct() {
        return struct;
    }
}
